package com.daoeping.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Bsc_contact entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bsc_contact", catalog = "daoeping")
public class Bsc_contact implements java.io.Serializable {

	// Fields

	private Integer id;
	private Usr_user usr_user;
	private Bsc_contacttype bsc_contacttype;
	private Cop_companyinfo cop_companyinfo;
	private String contact;

	// Constructors

	/** default constructor */
	public Bsc_contact() {
	}

	/** minimal constructor */
	public Bsc_contact(Bsc_contacttype bsc_contacttype) {
		this.bsc_contacttype = bsc_contacttype;
	}

	/** full constructor */
	public Bsc_contact(Usr_user usr_user, Bsc_contacttype bsc_contacttype,
			Cop_companyinfo cop_companyinfo, String contact) {
		this.usr_user = usr_user;
		this.bsc_contacttype = bsc_contacttype;
		this.cop_companyinfo = cop_companyinfo;
		this.contact = contact;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public Usr_user getUsr_user() {
		return this.usr_user;
	}

	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contact_type_id", nullable = false)
	public Bsc_contacttype getBsc_contacttype() {
		return this.bsc_contacttype;
	}

	public void setBsc_contacttype(Bsc_contacttype bsc_contacttype) {
		this.bsc_contacttype = bsc_contacttype;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "corp_id")
	public Cop_companyinfo getCop_companyinfo() {
		return this.cop_companyinfo;
	}

	public void setCop_companyinfo(Cop_companyinfo cop_companyinfo) {
		this.cop_companyinfo = cop_companyinfo;
	}

	@Column(name = "contact", length = 100)
	public String getContact() {
		return this.contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

}